package com.cy.src.tcpudp.service.tcp;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * Created by cy on 16-10-13.
 */

public class TCPService {

    private int PORT = 9999;

    public TCPService() {

//        Socket socket=new Socket()
        try {
            ServerSocket serverSocket = new ServerSocket(PORT);

            Socket clientSocket = serverSocket.accept();

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
